package com.erpx.api.weight;

import com.erpx.api.WdtClient;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * 重量回传
 */
public class WeightPushService {
    public static void weightPush() throws Exception {
        String appkey = "appkey_weight_qatest";
        String sid = "qatest";
        String appSecret = "F10021@1";
        String baseUrl = "https://openapitest.huice.com/openapi/";
        WdtClient client = new WdtClient(sid, appkey, appSecret, baseUrl);

        Map<String, String> params = new HashMap<String, String>();

        //        appkey=appkey_weight_qatest&is_check_trade_status=1&is_setting=1&logistics_no=JT12121212122&sid=qatest&timestamp=1728712052&weight=0.12&sign=7ad35e842f8cc36bb1611b7faf21e9bc
        params.put("logistics_no", "JDAZ18125762204");
        params.put("is_check_trade_status", "0");
        params.put("weight", "0.88");
        params.put("is_setting", "0");
        params.put("packager_no","");

        try {
            String response = client.execute("vip_stockout_sales_weight_push.php", params);
            System.out.println(response);
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }


}
